import React from 'react';
import {
  Form,
  Modal,
} from 'antd';

import DescriptionList from '@/components/DescriptionList';

const { Description } = DescriptionList;

//查看详情
const DescView = Form.create()(props => {
  const { lookDescView, handleLookDesc, selectedRows } = props;
  const status = ['募集中', '待审核', '驳回', '募满'];
  return (
    <Modal
      destroyOnClose
      title="查看债转详情"
      width={700}
      visible={lookDescView}
      onOk={() => handleLookDesc(false, [])}
      onCancel={() => handleLookDesc(false, [])}>
      <DescriptionList size="large" style={{ marginBottom: 32 }} col={2}>
        <Description term="项目名称">{selectedRows.projectName}</Description>
        <Description term="项目编号">{selectedRows.projectNo}</Description>
        <Description term="转让金额">{selectedRows.amount}</Description>
        <Description term="债转编号">{selectedRows.debtNo}</Description>
        <Description term="用户编号">{selectedRows.userNo}</Description>
        <Description term="折让率">{selectedRows.sale}</Description>
        <Description term="项目类型">{selectedRows.type === 1 ? '正常' : '逾期'}</Description>
        <Description term="状态">{status[selectedRows.status - 1]}</Description>
      </DescriptionList>
      <Description term="创建时间">{selectedRows.createTime}</Description>
    </Modal>
  );
});

export default DescView;
